1. Field of the Invention
This invention relates to an input/output interruption control system for virtual machines operating on a real machine.
2. Description of the Prior Art
A virtual machine system means a computer provided with a plurality of virtual computer systems simultaneously operating thereon. A plurality of virtual machines operate on a real machine using the principle of time sharing mainly. A virtual machine operates for a predetermined period of time. When the time is up, it stores the hardware status required for continued execution at the next occasion in its memory. Then, a program called virtual machine monitor or virtual machine control program starts operation. The virtual machine monitor (VMM) determines which virtual machine is to be activated next and instructs the hardware to activate that virtual machine. The hardware restores the hardware information for the newly activated virtual machine using the data stored on the memory and sets the time for use, and then, activates the new virtual machine. Typical examples of virtual machines as described above are given in "IBM Virtual Machine Facility/370: Introduction (GC-20-1800)".
The virtual machine monitor also serves for operations to be collectively controlled among the virtual machines on the source of the real machine (hardware). A typical example is the input/output operation. When a virtual machine inputs or outputs, the virtual machine monitor actually inputs or outputs on behalf of the virtual machine. The virtual machine monitor replaces a virtual input/output device of the virtual machine with a real device and activates the input/output operation by the real machine. An interruption to notify the completion of the input/output operation is accepted not by the virtual machine, but by the virtual machine monitor. The virtual machine monitor checks the input/output completion interruption to see for which virtual machine it is issued and simulates interruption to the target virtual machine.
In this method, however, simulation of the input/output operation by the virtual machine monitor results in a large overhead. Therefore, recent systems adopt the direct input/output execution method where the virtual machine directly activates input/output and accepts the input/output completion interruption.
In the direct input/output execution method, when a virtual machine running on an instruction processor (real machine) requests the input/output processor to activate input/output operation, it sends its virtual machine ID (VMID) to the input/output processor together with the input/output request so that the system can identify from which virtual machine the input/output request is received. A VMID is an identifier to specify a specific virtual machine among active virtual machines in the system. The input/output processor instructs the input/output device to start input/output operation upon request from a virtual machine, and upon completion of the input/output operation, sends an input/output completion interruption request together with the same VMID as the one received with the input/output operation request to the instruction processor. The instruction processor receiving the request compares the VMID sent from the input/output processor together with the input/output completion interruption with the VMID of the virtual machine which is currently running. If they are identical, then the interruption is accepted.
However, since virtual machines use the instruction processor with time sharing, when an input/output completion interruption for a virtual machine is sent to the instruction processor, it is possible that the virtual machine with the same VMID is not in operation on that instruction processor, which results in ignorance of the interruption. In such a case, a flag called an interruption cell showing that there was an interruption is set on the memory. Prior to sending an input/output completion interruption request to the instruction processor, the input/output processor records interruption occurrence information for that virtual machine at the interruption cell. With this step, the input/output processor can terminate the input/output operation and proceed to another operation. The interruption recorded in the interruption cell is recognized when the applicable virtual machine accepts the next interruption. Upon acceptance of the interruption, the instruction processor clears the interruption information in the interruption cell.
Thus, the ignored input/output interruption must wait until the time when the virtual machine with the same VMID runs on the instruction processor and another interruption is issued. The timing of next running of a specific virtual machine depends on the scheduling method for virtual machines used by the virtual machine monitor and operation status of other virtual machines. In addition, new interruption always comes after an uncertain period. Thus, the time until the interruption once ignored is accepted is always uncertain and input/output completion interruption may be kept waiting for a long time. This impairs the execution performance of a virtual machine serving for direct execution of input/output.